home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 005 / ecstat.arc / ECSTAT.MAN < prev    next >
Encoding:
Text File  |  1986-11-07  |  43.8 KB  |  1,321 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.                                   ECSTAT(tm)
  26.                     An instructional econometrics package
  27.                                  Version 1.1
  28.  
  29.  
  30.  
  31.  
  32.  
  33.                               Manual and Program by     Robert S. Dohner
  34.                                                         Fletcher School
  35.                                                         Tufts University
  36.                                                         Medford, MA, 02155
  37.  
  38.  
  39.  
  40.  
  41.  
  42.                  (Copyright (C) 1984.  All rights reserved.)
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.                                     NOTICE
  76.    Disclaimer:
  77.    This program is distributed AS IS, and is not guaranteed to be free of
  78.    errors or defects, nor is it guaranteed to do the specific task of the
  79.    user.  In no event will the author of this program be liable to you for
  80.    any damages, including any lost profits, lost savings, or other
  81.    incidental or consequential damages arising out of the use of or
  82.    inability to use this program, even if the author of this program has
  83.    been advised of the possibility of such damages, or for any claim by
  84.    any other party.
  85.  
  86.    User Supported Software:
  87.    This program is distributed as User Supported Software.  If you find
  88.    this program to be of value, you are encouraged to make a contribution
  89.    of $25 to the author at the address below.  An invoice is provided on
  90.    the next page for your convenience. Whether you contribute or not, you
  91.    are encouraged to copy and distribute this program, subject to the
  92.    restrictions below:
  93.  
  94.    A limited license is granted to all users of this program to make
  95.    copies of this program, and of this manual and distribute them to other
  96.    users subject to the following conditions:
  97.  
  98.        1. Neither this program nor this manual is to be distributed
  99.           to others in modified form.
  100.  
  101.        2. No more than $10.00 may be charged to cover copying costs, costs
  102.           of media, and costs of distribution.
  103.  
  104.        3. The notice displayed at the beginning of the program is not to
  105.           altered, bypassed, or removed.
  106.  
  107.    Finally, although this program has been tested extensively, there may
  108.    still be a few remaining errors.  The author would appreciate hearing
  109.    about them IN WRITING ONLY.  Please report documented errors to:
  110.  
  111.    Robert S. Dohner
  112.    Fletcher School
  113.    Tufts University
  114.    Medford, MA 02155
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.                                    -------
  142.                                    INVOICE
  143.                                    -------
  144.  
  145.    Purchased from:
  146.        Robert S. Dohner
  147.        Fletcher School
  148.        Tufts University
  149.        Medford, MA 02155
  150.  
  151.    DATE:     /   /                                  INVOICE #  00127
  152.    -----------------------------------------------------------------
  153.                                           QTY         PRICE
  154.  
  155.        ECSTAT Econometrics Program         1           $25
  156.  
  157.  
  158.                                           Sales Tax      0
  159.                                           ------------------
  160.                             PLEASE PAY THIS AMOUNT     $25    TOTAL
  161.    -----------------------------------------------------------------
  162.  
  163.    Make check payable to: Robert S. Dohner
  164.  
  165.  
  166.    You may retain this invoice for your records
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.                                                                      PAGE 3
  201.    ECSTAT(tm) Econometrics Program
  202.  
  203.  
  204.                                   ECSTAT(tm)
  205.                                     Manual
  206.          (Manual and Program by Robert S. Dohner, copyright (C) 1984)
  207.  
  208.  
  209.    Introduction
  210.  
  211.        This is a simple econometrics program, designed for instructional
  212.    use.  It allows the user to:
  213.  
  214.             1. Enter, edit, and display data
  215.  
  216.             2. Save data files on disks, and retrieve them from disks.
  217.  
  218.             3. Create new variables as functions of existing variables,
  219.             including logarithms, exponentials, square roots, and
  220.             trigonometric functions.
  221.  
  222.             4. Perform multiple linear regression, and linear regression
  223.             corrected for first order autocorrelation.  It also allows the
  224.             user to forecast regression equations out of sample.
  225.  
  226.             5. Create time plots and scatter plots of data
  227.  
  228.             6. Use sub-ranges of the data for graphing and regression, and
  229.             easily incorporate lags and leads in variables.
  230.  
  231.        The program relies on menus and prompts the user for information at
  232.    most points.  Thus the program is relatively easy to learn.  At present,
  233.    the program has very few frills.  This version is written for the IBM
  234.    Personal computer using advanced basic. A version also exists for the
  235.    Zenith Z-100 personal computer.
  236.  
  237.  
  238.    Some Preliminaries
  239.  
  240.        1. Format a new disk and transfer the operating system to it, using
  241.        the  FORMAT  /S  command under DOS.  Next copy the file BASICA.COM
  242.        (or BASIC.COM if you have the monochrome monitor and do not intend
  243.        to do graphics) onto the formatted disk.  Finally copy the files
  244.        ECSTAT.BAT and ECSTAT.BAS onto the disk, as well as the file
  245.        SAMPLE.DAT.  To start the program under DOS type in (at the A>
  246.        prompt)  ECSTAT .
  247.  
  248.        2. DO NOT write-protect the disk, as the program needs to write on
  249.        the disk during its operation.
  250.  
  251.        3. USE CAPITAL LETTERS...  The program expects that the user will
  252.        be using capital letters, so make sure that the Caps Lock key on
  253.        the computer is pressed down.
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.                                                                      PAGE 4
  267.    ECSTAT(tm) Econometrics Program
  268.  
  269.  
  270.        4. The operation of the program revolves around a menu of some 16
  271.        different operations that the user may perform.  If you are in the
  272.        midst of some operation and decide that you have made a mistake and
  273.        want to start over, then responding to a question by hitting the
  274.        Enter key (Return key) alone will get you back to the main menu.
  275.  
  276.  
  277.    Starting Out - Selecting the Data Range and Entering Data
  278.  
  279.        The first thing that the program will ask you is:
  280.  
  281.             DO YOU WISH TO LOAD DATA FROM A DISK FILE (Y/N)?>
  282.  
  283.    If you are just starting out, or if you are starting a new problem, the
  284.    answer to this question will be N (for no.)  You will immediately
  285.    be asked:
  286.  
  287.             NUMBER OF OBSERVATIONS>
  288.  
  289.    The basic unit of data in this program is the variable, which is given
  290.    a name (e.g. GNP), and consists of a column of numbers that are the
  291.    observations for that variable.  The observations are numbered from 1
  292.    to however many observations you have, and you are being asked here to
  293.    specify the size of the largest variable.
  294.  
  295.        Once you supply a number of observations, you are limited to
  296.    variables of this size or smaller, in the normal operation of the
  297.    program.  However, the user can at a later point extend the size of the
  298.    sample range using the  Extend Sample Range  command, listed under the
  299.    Housekeeping Operations .
  300.  
  301.        Next you will be presented with the following menu of choices:
  302.  
  303.             1.   CATALOG DATA IN MEMORY
  304.             2.   CATALOG FILES ON DISK
  305.             3.   DISPLAY DATA
  306.             4.   PRINT DATA
  307.             5.   ENTER DATA
  308.             6.   EDIT DATA
  309.             7.   SAVE DATA TO DISK
  310.             8.   RETRIEVE DATA FROM DISK
  311.             9.   CHANGE SAMPLE RANGE
  312.             10.  COMPUTE A NEW VARIABLE
  313.             11.  MEANS, VARIANCES, AND CORRELATIONS
  314.             12.  ORDINARY LEAST SQUARES REGRESSION
  315.             13.  REGRESSION - AUTOCORRELATION
  316.             14.  TWO STAGE LEAST SQUARES
  317.             15.  OUT OF SAMPLE REGRESSION FIT
  318.             16.  OUTLIERS AND INFLUENCE
  319.             17.  SCATTER PLOT
  320.             18.  TIME PLOT
  321.             19.  LOAD DATA FROM AN ASCII FILE
  322.             20.  HOUSEKEEPING OPERATIONS
  323.             21.  RESTART PROGRAM
  324.             22.  EXIT PROGRAM
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.                                                                      PAGE 5
  333.    ECSTAT(tm) Econometrics Program
  334.  
  335.  
  336.  
  337.        If you are using the program for the first time, or if you are
  338.    starting a new problem, then you will want to enter data, so enter a 5
  339.    and then hit the Enter key (carriage return).  Data may be entered for
  340.    one or more variables at a time. You first supply a name for each of
  341.    the variables you are entering data for.
  342.  
  343.        ONLY LETTERS AND NUMBERS MAY BE USED FOR VARIABLE NAMES, AND THE
  344.        FIRST CHARACTER OF THE NAME MUST BE A LETTER.
  345.  
  346.        Also, you should NOT use any of the following names, each of
  347.    which has a special meaning for the program:
  348.  
  349.        CONST  RESID  SRESID  LOG  EXP  SQR  ABS  SIN  COS  TAN
  350.  
  351.        You will next be prompted to enter the data for each variable in
  352.    turn, one observation at a time.  Decimal points are fine in numbers,
  353.    but DO NOT USE ANY COMMAS.  (Numbers may also be entered using
  354.    scientific notation.  Enter the mantissa, an E, and a two digit
  355.    exponent.  E.G.  1.23E02 = 123.) If you just hit the enter key, the
  356.    program will supply a zero and skip to the next observation (or if you
  357.    have backed up to the current observation, hitting return will maintain
  358.    the previous value and advance to the next variable.)
  359.  
  360.        Aside from entering numbers, there are two special commands that
  361.    you can use during data entry.  These are:
  362.  
  363.        B   (Backup) - move back one variable and re-enter data. If used
  364.            repeatedly, this will allow you to space back and correct a
  365.            mis-entry.
  366.  
  367.        E   (End) - stop data entry.  The program will supply zeroes for
  368.            the remaining observations on the variables.
  369.  
  370.  
  371.    Displaying Data
  372.  
  373.        Once you have entered data, you will often want to see what you
  374.    have entered.  Data can be displayed on the screen (using option #3 on
  375.    the Main menu), or the data can be printed out on the printer (option
  376.    #4). In each case, the program will ask you for the names of the
  377.    variables to be displayed.  These can be the names of variables that
  378.    you have entered data for, or variables that you have created, using
  379.    the procedure described in a later paragraph. You can enter as many
  380.    names as you want, but the computer will display the data four
  381.    variables at a time, doing the first four, and then the second four,
  382.    etc. (if you forget what the names of the variables are, you can find
  383.    out the names from option #1, Catalog data, described below.)
  384.  
  385.        If you have chosen to print the data out, make sure that a printer
  386.    is connected to the computer, that it is turned on, and that it has
  387.    paper.
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.                                                                      PAGE 6
  399.    ECSTAT(tm) Econometrics Program
  400.  
  401.  
  402.    Editing Data
  403.  
  404.        If you need to change the values of observations in a variable
  405.    (because you have revised data, or because you made a mistake in
  406.    entering the data), you can do so with Option #6, Edit Data.  Editing
  407.    is done one variable at a time.  The program will then ask:
  408.  
  409.        OBSERVATION NUMBER TO BE CHANGED >
  410.  
  411.    Here you can do one of three things.  You can:
  412.  
  413.        1. Supply an observation number (its place in line, NOT its value.)
  414.           The program will then allow you to change the value of that
  415.           observation.
  416.  
  417.        2. Enter an  N  (for Next), and the program will move to the next
  418.           observation.
  419.  
  420.        3. Hit the Return key only, and the program will take you back to
  421.           the Main Menu.
  422.  
  423.    If you have supplied an observation number (or the next observation)
  424.    the program will print the current value of that observation and ask:
  425.  
  426.        NEW VALUE?>
  427.  
  428.    Here you can do several things:
  429.  
  430.        1. If you enter a new number, the program will print the old and
  431.           the new values of that observation and then ask for the next
  432.           observation.
  433.  
  434.        2. If you simply hit the return key, the program will leave the
  435.           observation unchanged, and ask you for the next observation you
  436.           want to change.
  437.  
  438.        3. If you enter  D  (for Drop), the program will delete the current
  439.           value of this observation, and move all succeeding values back
  440.           one place in line.  The last observation of the variable becomes
  441.           zero.  This is useful if you copy something twice.
  442.  
  443.        4. If you enter  I  (for Insert), the program will move all the
  444.           values one place forward in line, starting with the current
  445.           observation.  This will open up a hole at the current
  446.           observation, and the program will then ask you for a value to
  447.           put in there.  This is useful if you leave something out in
  448.           copying a series of numbers.  (Remember that the process of
  449.           moving numbers ahead will cause the original value of the last
  450.           observation of the variable to be dropped.)
  451.  
  452.    After each of these observations, the program will ask you for the
  453.    number of the next observation to work with.  To get back to the main
  454.    menu, just hit the Return key alone.
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.                                                                      PAGE 7
  465.    ECSTAT(tm) Econometrics Program
  466.  
  467.  
  468.    Cataloging the Variables
  469.  
  470.        To find the names of all the variables that the computer is
  471.    currently storing, do Option 1 at the Main Menu.  The computer will
  472.    then tell you the number of observations that are stored for each
  473.    variable (this is the same for all variables), the number of variables
  474.    that you have defined, and the number of remaining variables that the
  475.    computer can hold.  Then it will tell you the names of the variables
  476.    that it is storing.
  477.  
  478.        The first name on this list will always be  CONST .   CONST  is a
  479.    variable that the computer defines for you, and is equal to  1  in each
  480.    of its observations.  You cannot alter this variable, and you should
  481.    not try to define another variable with the same name.  This variable
  482.    is included to employ a constant term in a regression.
  483.  
  484.        The catalog will also tell you the current sample range, which is
  485.    described in the section "About Variables" below.
  486.  
  487.  
  488.    Storing and Retrieving Data from Disks
  489.  
  490.        Data can be stored on disks, and later retrieved from them, so you
  491.    don't have to re-enter data each time you use the program.
  492.  
  493.        When you use this program, put your program disk in drive A: .  You
  494.    can store files on this disk (there should be plenty of room), or for
  495.    extra space you can store files on a second disk in drive B: .  When
  496.    storing or retrieving files from a drive other than the default drive,
  497.    make sure you include the device prefix.  E.g.  B:SAMPLE.DAT .
  498.  
  499.  
  500.    Storing files
  501.  
  502.        If you choose Option 7, "Save Data to Disk", the computer will ask
  503.    you for a filename. Give the computer the file name and press Return,
  504.    and it will store the file for you.
  505.  
  506.    Retrieving Files
  507.  
  508.        If you choose Option 8, "Retrieve Data from Disk", the computer
  509.    will go to the appropriate drive and look for the file.  If it is
  510.    there, and if the file was created by this program, it will read the
  511.    data into its memory and record the variable names.  If the file is not
  512.    there, the program will tell you.
  513.  
  514.        If you don't happen to remember the name of the file that you want,
  515.    you can have the program give you the names of the files stored on the
  516.    disk in either drive, by replying with a question mark "?" to the name
  517.    of file question (don't type the quotation marks.) The program will then
  518.    ask you for the appropriate drive.
  519.  
  520.        It is possible to combine data from two or more saved files.
  521.    Retrieve one file using Option 8.  Then use the add data procedure under
  522.    Option #20 (Housekeeping Operations), which is described below.
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.                                                                      PAGE 8
  531.    ECSTAT(tm) Econometrics Program
  532.  
  533.  
  534.    Displaying the Names of Files Stored on Disks
  535.  
  536.        If you want to find out the names of all the files that you have
  537.    stored on a disk, you can do so using Option #2 of the Main menu,
  538.    "Catalog Files Stored on Disk".  The program will ask you:
  539.  
  540.        WHICH DRIVE?>
  541.  
  542.    to which you should respond  A  or  B  (use capital letters, as
  543.    always.)  The program will then print out the names of the files stored
  544.    on the disk in that drive.  (The program will accept drive designations
  545.    A through H.)
  546.  
  547.    About Variables
  548.  
  549.        The remaining sections require you to know something about the way
  550.    the program stores and manipulates variables.  Once a variable is
  551.    created and given a name, that name refers to the variable as a whole,
  552.    in other words, the whole column of numbers (observations) that make up
  553.    the variable.  When you work with variables, as in regressions, finding
  554.    means, or doing plots, the program will work with all the observations
  555.    of that variable.  If you add two variables together to form a third,
  556.    or multiply two variables together to form a third (described below),
  557.    the computer will add (or multiply) the two variables observation by
  558.    observation to form the observations of the third.
  559.  
  560.    Sample Range
  561.  
  562.        There is a way to restrict the observations that the program works
  563.    with when it does regressions, finds means, does plots, or computes new
  564.    variables.  This is known as setting the "sample range".  When you
  565.    first create variables, you are asked the number of observations, and
  566.    this sets the maximum range for all variables.  This maximum remains
  567.    constant as long as you use a particular data set, and is stored along
  568.    with the variables when you store data on a disk.  When you first start
  569.    the program, or when you retrieve data from a disk, the sample range is
  570.    set equal to this maximum range.  However, you can change the sample
  571.    range to use only a portion of the total number of observations, and
  572.    you can also choose the sample range so that certain observations
  573.    within the variable are dropped.
  574.  
  575.        This is done by choosing Option #9 "Change Sample Range", on the
  576.    Main Menu.  To make the examples clearer, suppose that each variable
  577.    has 20 observations in all; the maximum range is 1 to 20, and the
  578.    sample range is initially set equal to this.
  579.  
  580.        Suppose you want to use only observations 1 to 15.  You choose
  581.    Option #9, and the program will ask you:
  582.  
  583.             ENTER SAMPLE RANGE(S):
  584.  
  585.    You respond by typing in  1, a space, 15, and then Enter, so the screen
  586.    looks like this:
  587.  
  588.             ENTER SAMPLE RANGE(S): 1 15 
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.                                                                      PAGE 9
  597.    ECSTAT(tm) Econometrics Program
  598.  
  599.  
  600.  
  601.    The program will return you to the main menu, and all regressions,
  602.    means, plots, and computed new variables will use only observations 1
  603.    to 15 of any variable.  To change the sample range, you have to use
  604.    Option #9 again.  To find out what the current sample range is, use
  605.    Option #1 "Catalog Data in Memory".
  606.  
  607.        Other options for specifying the sample range include:
  608.  
  609.             ENTER SAMPLE RANGE(S): 2 10 13 20 
  610.  
  611.    this forces the program to use only observations 2 to 10 and 13 to 20,
  612.    dropping observations 1, 11, and 12.  The numbers that you supply the
  613.    program must be in ascending order, must fall within the maximum range
  614.    of the observations (1 to 20 in this example), and up to ten pairs may
  615.    be used.
  616.  
  617.        You can also select individual observations like so:
  618.  
  619.             ENTER SAMPLE RANGE(S): 8 8 10 20
  620.  
  621.    which forces the computer to use observation 8 and observations 10 to
  622.    20.  Note that the 8 must be entered twice here (always maintain
  623.    pairs.)  The following ranges are invalid:
  624.  
  625.        1 25           takes sample range beyond maximum number of
  626.                       observations (20 in this example.)
  627.  
  628.        8 3            sample must be given in ascending order
  629.  
  630.        1 18 20        not an even number of entries.
  631.  
  632.        1 8 8 20       a single observation number cannot end one pair and
  633.                       start another.
  634.  
  635.  
  636.    Lags and Leads
  637.  
  638.        Suppose you were running a regression model and wanted to regress
  639.    the current level of investment (I) on last year's level of GNP.  The
  640.    program allows you to pair one observation of  I  with the previous
  641.    observation of  GDP  by specifying GNP in the regression as  GNP[-1] .
  642.  
  643.        The figure in square brackets is the lag.  It says that observation
  644.    number  5  of  GNP[-1]  is really observation number  4  of  GNP.  You
  645.    can lag a variable for as many periods as you wish (subject to the
  646.    warning below); thus if you have monthly data on car sales,  CARS ,
  647.    then  CARS[-12] would be the sales of the corresponding month of the
  648.    previous year.
  649.  
  650.        The number in square brackets can also be positive, thus GNP[1] and
  651.    GNP[+1]  (it doesn't matter which you use) refer to GNP in the next
  652.    period.
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.                                                                     PAGE 10
  663.    ECSTAT(tm) Econometrics Program
  664.  
  665.  
  666.    Restrictions on using lags are:
  667.  
  668.        1. The sample range must be adjusted so that the lag or lead does
  669.           not take the variable outside the range of available data.  In
  670.           our previous example, if you had 20 observations and were using
  671.           GNP[-1] then you would set the sample range at  2 20 .
  672.  
  673.        2. Lagged variables can generally be used anywhere on the right
  674.           hand side of an equation, but not the left hand side.  Thus you
  675.           can regress an unlagged variable on a lagged variable, but you
  676.           can't use a lagged variable as your dependent (LHS) variable.
  677.  
  678.             Similarly, you can create an unlagged variable as a function
  679.           of lagged variables, but you must use an unlagged name in
  680.           creating a new variable.
  681.  
  682.             Lagged variables can be used in scatter plots and time plots,
  683.           and can be included when you calculate means, variances and
  684.           covariances.
  685.  
  686.        3. Don't use variables with zero lag, and avoid embedded spaces in
  687.           lags.  Thus DON'T use  GNP[0]    use  GNP
  688.                       DON'T use  GNP[ -1]  use  GNP[-1]
  689.           Make sure no space comes between the variable name and the open
  690.           brackets, ie don't use GNP [-1].
  691.  
  692.  
  693.    Computing New Variables
  694.  
  695.        The program will do the tedious work of taking logarithms of
  696.    variables, or adding two variables together to form a third.  Use
  697.    Option #10, "Compute a New Variable" to form new variables (with new
  698.    names).  When you choose option 10, the program will ask you:
  699.  
  700.        ENTER FORMULA FOR VARIABLE TO BE COMPUTED
  701.  
  702.        >
  703.  
  704.    You then give the program a name for the new variable that you are
  705.    creating, and an equation that defines it.  For example you might
  706.    define consumption (CONS) as the difference between GNP and
  707.    investment:
  708.  
  709.        > CONS = GNP - I
  710.  
  711.    The program will compute CONS by subtracting  I  from  GNP  observation
  712.    by observation.
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.                                                                     PAGE 11
  729.    ECSTAT(tm) Econometrics Program
  730.  
  731.  
  732.        The functions that are available to you are:
  733.  
  734.        +  addition
  735.  
  736.        -  subtraction
  737.  
  738.        *  multiplication  (an asterix) (DONT use X)
  739.  
  740.        /  division
  741.  
  742.        ^  exponentiation   (ie  W^5  is W to the fifth power)
  743.  
  744.        LOG()  take the natural logarithm of what is in parentheses
  745.  
  746.        EXP()  raise  e  to the power of what is in parentheses
  747.  
  748.        SQR()  take the square root of what is in parentheses
  749.  
  750.        ABS()  absolute value
  751.  
  752.        SIN() , COS() , TAN()   sine, cosine, tangent
  753.  
  754.  
  755.        You can form fairly complicated formulas by combining the
  756.    operations above, and by using parentheses.  However there are a few
  757.    things you must be careful of.  When several operations are included in
  758.    a formula, the program does them in a particular order.  The order is:
  759.  
  760.        1. The functions LOG EXP SQR ABS SIN COS TAN are calculated first
  761.  
  762.        2. exponentiation is done second.
  763.  
  764.        3. multiplication and divison are done third.
  765.  
  766.        4. addition and subtraction are done last.
  767.  
  768.    Thus:
  769.  
  770.        5+3*2 = 11   (not 16)
  771.  
  772.        2^2*3 = 12   (not 64)
  773.  
  774.    if you are in doubt about the order of calculation, use parentheses:
  775.  
  776.        (5+3)*2 = 16
  777.  
  778.        2^(2*3) = 64
  779.  
  780.    For the most part you will be working with variables that already
  781.    exist.  Some examples:
  782.  
  783.        LGNP = LOG(GNP)  calculates the log of GNP
  784.  
  785.        PCGNP = 100*(GNP/GNP[-1] - 1)  calculates the percentage change
  786.                                       in GNP.
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.                                                                     PAGE 12
  795.    ECSTAT(tm) Econometrics Program
  796.  
  797.  
  798.  
  799.    Some things to remember:
  800.  
  801.        1. In calculating the new variable, the program needs to be able to
  802.           write on the program disk.  DO NOT WRITE-PROTECT YOUR PROGRAM
  803.           DISK!
  804.  
  805.        2. Don't try to take the square root of a negative number, the
  806.           logarithm of zero or of a negative number, and don't divide
  807.           by zero.
  808.  
  809.        3. When squaring a variable  W, use W*W and not W^2 . The first
  810.           method is faster, and more accurate.
  811.  
  812.        4. The program will tell you if it has successfully calculated your
  813.           formula, but it won't tell you if that was really what you
  814.           wanted to calculate.  Be careful, and display and check your
  815.           data occasionally.
  816.  
  817.  
  818.    Calculating Means, Variances, and Correlations
  819.  
  820.        Option #11 allows you to calculate the means, standard deviations,
  821.    and variances of a group of variables, and the correlations among them.
  822.    If you choose option 11 the program will ask:
  823.  
  824.        ENTER VARIABLE NAME(S) SEPARATED BY A SPACE>
  825.  
  826.    Up to 20 variable names may be entered.  The program will use only the
  827.    observations specified in the current sample range, and will calculate
  828.    means, variances and standard deviations, as well as correlation
  829.    coefficients for the variables.  You will be given an opportunity to
  830.    print the results if you wish to.  Make sure the printer is on and has
  831.    paper if you do want to print out results.  It is perfectly all right to
  832.    include lagged variables in the list of names, but make sure that the
  833.    sample range is adjusted so that you do not go outside the available
  834.    data.
  835.  
  836.  
  837.    Multiple Regression
  838.  
  839.        Option #12 allows you to run an ordinary least squares regression
  840.    of one dependent variable on up to 20 right hand side variables
  841.    (including the constant.)  The regression will be calculated using the
  842.    current sample range.  When you choose option 12, the program will ask
  843.    for the name of the dependent (left hand side) variable, and then will
  844.    ask for the independent (right hand side) variables.
  845.  
  846.    CONST  There is a variable that is internal to the program, called
  847.           CONST that consists entirely of 1's.  You must include this
  848.           variable in your list of right hand side variables in order to
  849.           get a constant term in the regression.
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.                                                                     PAGE 13
  861.    ECSTAT(tm) Econometrics Program
  862.  
  863.  
  864.        For example, if you wanted to regress the level of consumption
  865.    expenditures (CONS) on a constant, its own lagged value, the level of
  866.    GNP and the interest rate (R), you would respond so the screen looks
  867.    like this:
  868.  
  869.        ENTER DEPENDENT VARIABLE
  870.        VARIABLE NAME IS?>  CONS
  871.  
  872.        ENTER INDEPENDENT VARIABLES
  873.        ENTER VARIABLE NAMES SEPARATED BY A SPACE> CONST CONS[-1] GNP R
  874.  
  875.    The program will then calculate the regression for you, and print on
  876.    the screen the estimated coefficients, along with their estimated
  877.    standard errors and T-statistics.  The program will also display
  878.    several summary statistics concerning the regression, and give you the
  879.    option of showing the estimated variance-covariance matrix of the
  880.    estimated coefficients.
  881.  
  882.        You will also be given the option to repeat the output on the
  883.    screen, and to print either the coefficient estimates, the variance
  884.    covariance matrix, or both.
  885.  
  886.    RESID   The program contains an internal variable called  RESID
  887.            which contains the residuals from the last regression that
  888.            was performed. You can save these residuals by moving them to
  889.            another variable, through the computation procedure in Option
  890.            #10.  Thus you might use option 10 and respond:
  891.  
  892.            > RES = RESID
  893.  
  894.            The fitted value of the variable may be found by subtracting
  895.            RESID (or RES in this example) from the actual value of the
  896.            dependent variable (CONS in this example.) 
  897.  
  898.            > FIT = CONS - RESID
  899.  
  900.            These new variables,  RES  and  FIT  could be examined later,
  901.            or plotted on the screen.
  902.  
  903.  
  904.    Correction for First-Order Autocorrelation (Cochrane-Orcutt)
  905.  
  906.        The program allows regression estimates corrected for first order
  907.    autocorrelation using the Cochrane-Orcutt method.  The method involves
  908.    using quasi-differences of the variable data (eg  CONS - RHO*CONS(-1)).
  909.    The procedure works the same way as in ordinary least squares; you are
  910.    asked for the dependent variable, and then for a list of independent
  911.    variables.  In addition, you will be asked if you want to choose a
  912.    starting value for the autocorrelation coefficient,  RHO .  If you reply
  913.    NO , or simply use a carriage return, the program will start with an
  914.    initial value of zero.
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.                                                                     PAGE 14
  927.    ECSTAT(tm) Econometrics Program
  928.  
  929.  
  930.        The procedure iterates to get a progressively better value for RHO,
  931.    and proceeds until the successive changes in  RHO  are small.  The
  932.    procedure is slow, so wait for it.  It will tell you if anything is
  933.    wrong.  The program will print the final value of  RHO , the estimated
  934.    coefficients, and their estimated standard errors and T-statistics, and
  935.    give you the option of seeing the variance-covariance matrix.  You can
  936.    repeat the screen output, or have it printed out.
  937.  
  938.        The program also makes available the residuals from the estimation
  939.    procedure, and these are available in the variable  RESID .
  940.  
  941.    WARNING: In the current version of the program, the sample range for
  942.    the estimation must be continuous.
  943.  
  944.  
  945.    Two Stage Least Squares
  946.  
  947.        Option #14 allows you to estimate an equation using instrumental
  948.    variables (two-stage least squares).  If you choose option 14 the
  949.    program will first ask you for the dependent variable, then the
  950.    explanatory variables, just as in ordinary least squares.  Finally the
  951.    program will ask you for the names of the variables that you wish to
  952.    include as instruments.  Here you should include the names of all of the
  953.    variables you specified as explanatory variables that are exogenous
  954.    (including the constant) and at least one instrumental variable for each
  955.    endogenous variable included in the list of explanatory variables.  Thus
  956.    there must be at least as many instruments in total as there are
  957.    explanatory variables in the equation.
  958.  
  959.        For example, suppose that you are estimating consumption (CONSUMP)
  960.    as a function of income (Y) and the interest rate (R).  You consider
  961.    income and consumption to be endogenous, while you assume that the
  962.    interest rate is exogenous (given by world interest rates.)  You also
  963.    consider exports (X) and government expenditure (G) to be exogenous
  964.    variables, and so available for use as instruments.  To estimate a
  965.    comsumption function using two stage least squares you would respond:
  966.  
  967.        DEPENDENT VARIABLE
  968.        VARIABLE NAME IS? > CONSUMP
  969.  
  970.        EXPLANATORY VARIABLES
  971.        ENTER VARIABLE NAMES
  972.        SEPARATED BY A SPACE > CONST Y R
  973.  
  974.        INSTRUMENTS
  975.        ENTER VARIABLE NAMES
  976.        SEPARATED BY A SPACE > CONST R X G
  977.  
  978.    The program will then perform the two-stage regression, print out
  979.    estimated coefficients and standard errors, and the estimated variance-
  980.    covariance matrix.  Residuals are made availble in the variable RESID,
  981.    and the equation can be estimated out of sample using the following
  982.    procedure.
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.                                                                     PAGE 15
  993.    ECSTAT(tm) Econometrics Program
  994.  
  995.  
  996.    Forecasting a Regression Equation Beyond the Sample
  997.  
  998.        Option #15 allows you to project an equation estimated by any of
  999.    the regression options outside the sample upon which the equation was
  1000.    originally estimated.  Suppose, for example, that you had estimated the
  1001.    consumption equation described above, using observations 1 to 15
  1002.    (sample range 1 15).  The forecast option allows you to see how well
  1003.    the equation does at predicting the values of consumption in periods 16
  1004.    or later, using the right hand side variables for those periods, and
  1005.    the estimated regression model from the earlier observations.
  1006.  
  1007.        First, you must run the regression on the sample range of 1 to 15.
  1008.    Immediately after you run the regression, choose option 15 from the
  1009.    main menu.  The program will ask you for the sample range for the
  1010.    forecast, and if you wanted to use the remaining observations, you
  1011.    would respond  16 20 .  However the program also allows you to include
  1012.    observations within the original estimation period, so you can see how
  1013.    the equation was doing at the point at which it started forecasting.
  1014.    In this case, you might reply  12 20 , to see the last four
  1015.    observations in the estimation period, and the five observations of the
  1016.    forecast period.
  1017.  
  1018.        The program will display actual values of the left hand side
  1019.    variable, the fitted value from the regression equation, and the
  1020.    prediction error for each observation.  Some summary statistics are
  1021.    calculated for the forecast period and displayed.  (These only apply to
  1022.    the observations outside the original estimation period.)  The program
  1023.    will also ask you if you want to see a graph of the results.  If you
  1024.    respond  Y (yes), then the program will prepare a time plot of the
  1025.    actual and fitted values, and separate the estimation from the forecast
  1026.    period by a dashed vertical line.
  1027.  
  1028.        If you exit this option here, the sample range will remain that of
  1029.    the forecast, and this sample range will apply to all operations you do
  1030.    after the forecast.  The program will automatically tell you the
  1031.    current sample range, and will ask you if you want to change the sample
  1032.    range.  Either enter the desired sample range, or hit  Return  to
  1033.    retain the current range.
  1034.  
  1035.  
  1036.        (A technical note:  If the original equation was estimated using a
  1037.    correction for serial correlation of the error term, the out of sample
  1038.    forecast will add in a fraction of the error term of the last
  1039.    observation of the estimation period.  That fraction is  RHO  raised to
  1040.    the power of the current observation number minus the number of the
  1041.    last observation of the sample period.  Forecast errors within the
  1042.    forecast period are NOT used to improve the next period forecast.  For
  1043.    correct results, the forecast range must be continuous.)
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.                                                                     PAGE 16
  1059.    ECSTAT(tm) Econometrics Program
  1060.  
  1061.  
  1062.    Outliers and Influence
  1063.  
  1064.        As an aid to regression diagnostics, Option #16 will allow you to
  1065.    retrieve corrected (Studentized) residuals, and to determine the Cook's
  1066.    Distance for each data point, a mesure of the influence of that data
  1067.    point on the regression results.  The studentized residuals are
  1068.    scaled to have unit variance, and are calculated by using the following
  1069.    matrix:
  1070.  
  1071.        M  = (I - X(X'X) X')
  1072.  
  1073.    which produces the residuals from the error term in the regression
  1074.    model.  Option #16 calculates the Studentized residuals from the last
  1075.    regression that was performed, prints them out, and also stores them in
  1076.    an internal variable  SRESID , where they can be retrieved using option
  1077.    #10 and plotted.  The program also prints out the (uncorrected)
  1078.    residual, the diagonal elements from the  M  matrix, Mii , and the
  1079.    Cook's Distance for the data point.  The last is a measure of the extent
  1080.    to which the regression coefficients would have changed, had that
  1081.    particular data point been deleted from the sample.
  1082.  
  1083.        Although the Cook's Distance measure is not distributed as an  F
  1084.    distribution, the F table does provide an approximate scale by which to
  1085.    judge the significance of the measure.  For further information on
  1086.    Cook's Distance, and on the studentized residuals, see Weisberg,
  1087.    Sanford, Applied Linear Regression (New York; Wiley, 1980) Chapter 5.
  1088.  
  1089.        NOTE: The outliers and influence procedure is only available
  1090.    following an ordinary least squares regression.
  1091.  
  1092.  
  1093.    Graphics
  1094.  
  1095.        The program makes some rudimentary graphics available to you.  The
  1096.    program will produce time plots of up to four variables (plots of the
  1097.    variables by observation), and will produce scatter plots of one
  1098.    variable against another.
  1099.  
  1100.        Note: On the IBM Personal Computer, the use of either of these
  1101.    options requires that you be using advanced basic, and that the results
  1102.    be displayed on a screen connected to the Color/Graphics Adapter.
  1103.  
  1104.  
  1105.    Scatter Plot
  1106.  
  1107.        Option #17 allows you to produce a scatter plot of values of one
  1108.    variable against the corresponding values of another variable.  When
  1109.    you choose this option, you will be asked for the name of the variable
  1110.    to put on the  X-axis  and the variable to put on the  Y-axis .  The
  1111.    program will then draw the scatter plot.  The axes are labelled, but
  1112.    the units are not marked.  The axes will shift to indicate where zero
  1113.    is for each variable, if zero is included in the values within the
  1114.    sample range of either variable.
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.                                                                     PAGE 17
  1125.    ECSTAT(tm) Econometrics Program
  1126.  
  1127.  
  1128.    Time Plot
  1129.  
  1130.        Option #18 will plot up to four variables by observation, drawing
  1131.    lines between successive values of the variables.  The actual values
  1132.    for each observation are indicated by, successively, a + , an X, a box,
  1133.    and a diamond.  The units are not given on the axes, but the X-axis
  1134.    will shift to indicate where zero is, if it falls within the range of
  1135.    values of the variables.
  1136.  
  1137.        Before the program draws the time-plot, it will ask you whether you
  1138.    want the variables scaled by means.  If you say no, the program will
  1139.    plot the actual value of the variables on the screen.  If you say yes,
  1140.    the program will divide the values of each variable by the sample
  1141.    average of the variable.  This puts the variables in the same range,
  1142.    and is useful if the variables differ greatly in size.
  1143.  
  1144.  
  1145.  
  1146.    Loading Data from Non-ECSTAT Files
  1147.  
  1148.        Option #19 allows the user to enter data from ASCII files.  This
  1149.    allows transfer of data from spreadsheet programs such as VisiCalc
  1150.    (using xxxxxx.PRF files) or SuperCalc or 1-2-3 (using xxxxxx.PRN
  1151.    files).  It also allows the user to prepare a data file using a
  1152.    word-processing or editing program.
  1153.  
  1154.        The program expects certain things of the ASCII file that it is
  1155.    reading in, and care should be taken to produce files that meet these
  1156.    requirements.  One or more initial lines of the file may be blank, these
  1157.    will be ignored by the program.  The first line of information in the
  1158.    file may optionally be a list of the variable names to which the data
  1159.    corresponds.  Note that these names must all appear on a single line,
  1160.    separated by spaces.
  1161.  
  1162.        The rest of the file must consist only of data (numbers), separated
  1163.    by spaces.  The data may either be given as values for each of the
  1164.    variables in turn for a single observation, followed by data for the
  1165.    variables for the next observation (ordering by observation).  Or the
  1166.    data may be given as all the observations for a single variable,
  1167.    followed by all the observations for the next variable, etc. (ordering
  1168.    by variable).  ALL THE VARIABLES MUST HAVE THE SAME NUMBER OF
  1169.    OBSERVATIONS OF DATA.
  1170.  
  1171.        Ordering the data by observation is preferable if it can be done.
  1172.    In a spreadsheet program this would correspond to a Print file with the
  1173.    data for each variable in columns.  Thus a data file with odd numbers,
  1174.    even numbers, and powers of two would look like:
  1175.  
  1176.        ODDS EVENS   TWOS
  1177.         1     2      2
  1178.         3     4      4
  1179.         5     6      8
  1180.         7     8     16
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.                                                                     PAGE 18
  1191.    ECSTAT(tm) Econometrics Program
  1192.  
  1193.  
  1194.        When you load a file using option 19, the program will first ask
  1195.    you for the name of the file that contains the data.  Next it will ask
  1196.    for the number of observations (data points) for each variable, and the
  1197.    number of variables.  It will next ask if variable names are included
  1198.    in the file. If variable names are not given in the file, you will be
  1199.    asked to supply them.  Finally, you will be asked whether the data is
  1200.    ordered by observation or by variable.
  1201.  
  1202.        Loading data from an external file is by its nature much trickier
  1203.    than loading data from a file created by the program.  After you load
  1204.    the data you should check the variables currently held in memory, and
  1205.    display the values for the first and the last variable loaded.
  1206.  
  1207.  
  1208.    Housekeeping Operations
  1209.  
  1210.        Choosing option #20 produces the following menu:
  1211.  
  1212.          1   RENAME A VARIABLE
  1213.          2   DELETE VARIABLE(S)
  1214.          3   EXTEND DATA RANGE
  1215.          4   ADD DATA FROM A DISK FILE
  1216.          5   RETURN TO MAIN MENU
  1217.  
  1218.        Option #1 allows you to change the name of a variable currently
  1219.    being held in memory.  The program will display a list of the current
  1220.    variable names, ask you for the old name, and then for the new name.
  1221.  
  1222.        Option #2 allows you to delete one or more variable to free up
  1223.    space.  The program will display a list of the current variable names,
  1224.    and ask you for the names of one or more variables to be deleted.
  1225.  
  1226.        Option #3 allows you to increase the maximum range of variables to
  1227.    include new observations.  You will be told the current maximum
  1228.    observation number, and asked to specify a new maximum.  The program
  1229.    will supply zeroes for the added observations.  Data values can be
  1230.    supplied using the  Edit  operation from the main menu.
  1231.  
  1232.        Option #4 allows you to read in data from a disk file, and add it to
  1233.    the data that is currently being stored in memory.  In this way, data
  1234.    from two or more data files can be combined.  The length of stored
  1235.    variables in memory is determined by the current maximum range.  If the
  1236.    number of observations on the variables stored in the second disk file
  1237.    is greater than this range, the final observations on the added variable
  1238.    will be dropped when they are read in.  If the current maximum data
  1239.    range is longer than the variables that are being read in from the
  1240.    second disk file, the remaining observations will be set to zero.
  1241.  
  1242.        In using Option #4, you must take particular care to assure that the
  1243.    observation numbers on the original data in memory and the observation
  1244.    numbers on the data being read in correspond.  The program assumes that
  1245.    they match up correctly.
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.                                                                     PAGE 19
  1257.    ECSTAT(tm) Econometrics Program
  1258.  
  1259.  
  1260.    Remaining Options
  1261.  
  1262.        The remaining options are Option #21, which allows you to start
  1263.    the program over from the beginning, so as to use a new data set.
  1264.    Option #22 allows you to quit the program.  You should be careful using
  1265.    either of these options, because you will lose the values of the
  1266.    current variables, unless you have saved them on the disk.
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.